/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ServiceInterface;
import javax.ejb.Local;
import DataModel.*;
import java.sql.Connection;
import java.util.Date;

/**
 *
 * @author Carlos
 */
@Local
public interface IFacade
{

    Connection GetReportConnection();

    Country[] GetCountries();
    
    ProjectSummary[] GetProjects(Enums.ProjectState status, Enums.ProjectType type, int pageNumber);
    ProjectSummary[] GetProjectsByType(Enums.ProjectType type, int pageNumber);
    ProjectSummary[] GetProjectsByCountry(int countryId, Enums.ProjectType type, int pageNumber);
    int GetProjectsCount(Enums.ProjectType type);
    int GetProjectsCount(Enums.ProjectType type, int countryId);
    int GetProjectsCount(Enums.ProjectType type, Enums.ProjectState status);
    Project GetProject(int projectId);

    void ApproveRequest(int requestId);
    void RejectRequest(int requestId);

    void AssingProjectOfficer(int projectId, int officerId);

    PaymentBase[] GetProjectPayments(int projectId);
    Payment GetPayment(int paymentId);
    void RegisterPayment(int paymentId, Date date, double amount);

    Organization GetOrganization(int organizationId);

    PersonSummary[] GetUsersInRole(Enums.UserRole role);

    void RegisterAdvance(int activityId, Date date, double advance, double spentBudget);
    Advance[] GetAdvances(int activityId);
    Activity GetActivity(int activityId);
    ActivitySummary[] GetSchedule(int projectId);

    public Project[] GetIncompleteRequests(int userId);
    public Project GetIncompleteRequest(int userId, int requestId);
    public boolean CreateRequest(String name, Date iniDate, Date endDate, String bankAcc, double iniBudget,
            int countryId, String description, String objectives, int orgId, int userId);

}
